#ifndef BUILDERWIDGET_H
#define BUILDERWIDGET_H

#include <QWidget>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QCheckBox>
#include <QGridLayout>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>

#include "math.h"

class QSlider;

class Robot;
class Core;

class rawdataWidget : public QWidget
{
	Q_OBJECT

public:
	rawdataWidget(Robot *robot, Core *core);
	void setTabIndex(int index);
	
public slots:
	void tabSelected(int index);
	void robotLoaded();

signals:
	void exportData(int);

private:
	Robot *robotPointer;
	Core *corePointer;
	QTableWidget *tableWidget;
	int tabIndex;
	QGridLayout *optionsLayout;
	QHBoxLayout *buttonsLayout;
	QVBoxLayout *mainLayout;
		
	QCheckBox *checkBoxActuation;
	QCheckBox *checkBoxPosition;
	QCheckBox *checkBoxOrientation;
	QCheckBox *checkBoxDHParams;
	
	QPushButton *refreshButton;
	QPushButton *calculateButton;
	QPushButton *exportButton;
	
	float round(float number);
	int roundPrecision;
	
private slots:
	void showActuation(int state);
	void showPosition(int state);
	void showOrientation(int state);
	void showDHParams(int state);
	
	void resetTable();
	void calculate();
	void exportData();
	
 };

#endif
